function writeDynaList(a,b,c,d,e){var g,h,f="\n  <select "+a+">";g=0;for(x in b)b[x][0]==c&&(h="",(d==c&&e==b[x][1]||0==g&&d!=c)&&(h='selected="selected"'),f+='\n     <option value="'+b[x][1]+'" '+h+">"+b[x][2]+"</option>"),g++;f+="\n </select>",document.writeln(f)}function changeDynaList(a,b,c,d,e){var f=document.adminForm[a];for(i in f.options.length)f.options[i]=null;i=0;for(x in b)b[x][0]==c&&(opt=new Option,opt.value=b[x][1],opt.text=b[x][2],(d==c&&e==opt.value||0==i)&&(opt.selected=!0),f.options[i++]=opt);f.length=i}function radioGetCheckedValue(a){if(!a)return"";var c,b=a.length;if(void 0==b)return a.checked?a.value:"";for(c=0;b>c;c++)if(a[c].checked)return a[c].value;return""}function getSelectedValue(a,b){var c=document[a],d=c[b];return i=d.selectedIndex,null!=i&&i>-1?d.options[i].value:null}function listItemTask(a,b){var d,e,c=document.adminForm,f=c[a];if(f){for(d=0;!0&&(e=c["cb"+d],e);d++)e.checked=!1;f.checked=!0,c.boxchecked.value=1,submitbutton(b)}return!1}function submitbutton(a){submitform(a)}function submitform(a){a&&(document.adminForm.task.value=a),"function"==typeof document.adminForm.onsubmit&&document.adminForm.onsubmit(),"function"==typeof document.adminForm.fireEvent&&document.adminForm.fireEvent("onsubmit"),"function"==typeof jQuery&&jQuery(document.adminForm).submit(),document.adminForm.submit()}function saveorder(a,b){checkAll_button(a,b)}function checkAll_button(a,b){b||(b="saveorder");var c,d;for(c=0;a>=c;c++){if(d=document.adminForm["cb"+c],!d)return alert("You cannot change the order of items, as an item in the list is `Checked Out`"),void 0;0==d.checked&&(d.checked=!0)}submitform(b)}Joomla=window.Joomla||{},Joomla.editors={},Joomla.editors.instances={},Joomla.submitform=function(a,b){"undefined"==typeof b&&(b=document.getElementById("adminForm")),"undefined"!=typeof a&&""!==a&&(b.task.value=a),"function"==typeof b.onsubmit&&b.onsubmit(),"function"==typeof b.fireEvent&&b.fireEvent("onsubmit"),b.submit()},Joomla.submitbutton=function(a){Joomla.submitform(a)},Joomla.JText={strings:{},_:function(a,b){return"undefined"!=typeof this.strings[a.toUpperCase()]?this.strings[a.toUpperCase()]:b},load:function(a){for(var b in a)this.strings[b.toUpperCase()]=a[b];return this}},Joomla.replaceTokens=function(a){var c,b=document.getElementsByTagName("input");for(c=0;c<b.length;c++)"hidden"==b[c].type&&32==b[c].name.length&&"1"==b[c].value&&(b[c].name=a)},Joomla.isEmail=function(a){var b=new RegExp("^[\\w-_.]*[\\w-_.]@[\\w].+[\\w]+[\\w]$");return b.test(a)},Joomla.checkAll=function(a,b){if(b||(b="cb"),a.form){var d,e,c=0;for(d=0,n=a.form.elements.length;n>d;d++)e=a.form.elements[d],e.type==a.type&&(b&&0==e.id.indexOf(b)||!b)&&(e.checked=a.checked,c+=1==e.checked?1:0);return a.form.boxchecked&&(a.form.boxchecked.value=c),!0}return!1},Joomla.renderMessages=function(a){Joomla.removeMessages();var b=document.getElementById("system-message-container");for(var c in a)if(a.hasOwnProperty(c)){var d=a[c],e=document.createElement("div");e.className="alert alert-"+c;var f=Joomla.JText._(c);if("undefined"!=typeof f){var g=document.createElement("h4");g.className="alert-heading",g.innerHTML=Joomla.JText._(c),e.appendChild(g)}for(var h=d.length-1;h>=0;h--){var i=document.createElement("p");i.innerHTML=d[h],e.appendChild(i)}b.appendChild(e)}},Joomla.removeMessages=function(){for(var a=document.getElementById("system-message-container");a.firstChild;)a.removeChild(a.firstChild);a.style.display="none",a.offsetHeight,a.style.display=""},Joomla.isChecked=function(a,b){"undefined"==typeof b&&(b=document.getElementById("adminForm")),1==a?b.boxchecked.value++:b.boxchecked.value--;var d,e,c=!0;for(d=0,n=b.elements.length;n>d;d++)if(e=b.elements[d],"checkbox"==e.type&&"checkall-toggle"!=e.name&&0==e.checked){c=!1;break}b.elements["checkall-toggle"]&&(b.elements["checkall-toggle"].checked=c)},Joomla.popupWindow=function(a,b,c,d,e){var g,h,i,f=(screen.width-c)/2;g=(screen.height-d)/2,h="height="+d+",width="+c+",top="+g+",left="+f+",scrollbars="+e+",resizable",i=window.open(a,b,h),i.window.focus()},Joomla.tableOrdering=function(a,b,c,d){"undefined"==typeof d&&(d=document.getElementById("adminForm")),d.filter_order.value=a,d.filter_order_Dir.value=b,Joomla.submitform(c,d)};
